//
//  HETeamSpecView.h
//  HealthElderly
//
//  Created by 吴欧 on 2021/1/21.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SepecModel.h"
#import "HETeamModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, HETeamSpecType) {
    HETeamSpecTypeGoodsDetails, // 加入购物车
    HETeamSpecTypeWxmin         // 立即购买
};

typedef void(^SelectSpecViewBlock)(id model);


@protocol HETeamSpecViewDelegate <NSObject>

- (void)seeDetailsVC;

@end

@interface HETeamSpecView : UIView

@property (nonatomic, weak) id <HETeamSpecViewDelegate> delegate;

/**
 数据源模型
 */
@property (nonatomic, strong) NSArray <SepecModel *> *dataArr;

@property (nonatomic, strong) NSArray<compareSepecModel *> *comparedataArr;

@property (nonatomic, strong) HETeamModel *goods;

@property (nonatomic, copy) NSString *compeleteStr; // 选中或是未选择的规格

@property (nonatomic, assign) HETeamSpecType type;

/// 是否显示 ‘查看详请’
@property (nonatomic, assign) BOOL showDetailBtn;

/// 确认按钮的标题
@property (nonatomic, copy) NSString *comfireBtnTitle;

/// 能否取消选中的属性
@property (nonatomic, assign) BOOL enableCancle;

/**
 选择完成后回调
 */
@property (nonatomic, copy) SelectSpecViewBlock finishSelectedBlock;


+ (HETeamSpecView *)selectSpecViewWithdataArr:(NSArray<SepecModel *> *)dataArr;

/**
 显示
 */
- (void)show;

/**
 隐藏
 */
- (void)hiddenView;

@end

NS_ASSUME_NONNULL_END
